package main

import (
	"bytes"
	"fmt"
	"strings"
)

func main() {
	trcer := "hello , golang 我来了"
	comma := strings.Index(trcer, ",")
	fmt.Println(comma)

	// 修改字符串
	angel := "heros never die"
	angle := []byte(angel)
	for i := 5; i < 10; i++ {
		angle[i] = ' '

	}
	fmt.Println(string(angle))

	// 字符串拼接
	hammer := "hello"
	sickle := "不会"

	// 声明字节缓冲
	var string_builder bytes.Buffer
	// 吧字符串写入缓冲
	string_builder.WriteString(hammer)
	string_builder.WriteString(sickle)
	fmt.Println(string_builder.String())
}
